package com.ayq.activiti.manager.domain.custom.entity;

import com.ayq.activiti.common.util.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;
import java.util.Date;

/**
 *
 * <p>包装类</p>
 * @Author ayq
 * @Date 2021/3/26 9:27
 */
public class DisDeployment extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 639719388464815380L;

    @TableField("ID_")
    private String id;

    @TableField(value = "SUSPENSION_STATE_")
    private boolean isSuspended;

    @TableField(value = "d_name")
    private String dName;

    @TableField(value = "d_key")
    private String dKey;

    @TableField(value = "deployment_time")
    private Date deploymentTime;

    @TableField(value = "ENGINE_VERSION_")
    private String engineVersion;

    @TableField(value = "p_name")
    private String pName;

    @TableField(value = "p_key")
    private String pKey;

    @TableField(value = "VERSION_")
    private int version;

    @TableField(value = "DEPLOYMENT_ID_")
    private String deploymentId;

    @TableField(value = "RESOURCE_NAME_")
    private String resourceName;

    @TableField(value = "diagram_resource_name")
    private String diagramResourceName;

    public boolean isSuspended() {
        return isSuspended;
    }

    public void setSuspended(int suspended) {
        if(suspended == 1){
            isSuspended = false;
        } else {
            isSuspended = true;
        }
    }

    public String getdName() {
        return dName;
    }

    public void setdName(String dName) {
        this.dName = dName;
    }

    public String getdKey() {
        return dKey;
    }

    public void setdKey(String dKey) {
        this.dKey = dKey;
    }

    public Date getDeploymentTime() {
        return deploymentTime;
    }

    public void setDeploymentTime(Date deploymentTime) {
        this.deploymentTime = deploymentTime;
    }

    public String getEngineVersion() {
        return engineVersion;
    }

    public void setEngineVersion(String engineVersion) {
        this.engineVersion = engineVersion;
    }

    public String getpName() {
        return pName;
    }

    public void setpName(String pName) {
        this.pName = pName;
    }

    public String getpKey() {
        return pKey;
    }

    public void setpKey(String pKey) {
        this.pKey = pKey;
    }

    public int getVersion() {
        return version;
    }

    public void setVersion(int version) {
        this.version = version;
    }

    public String getDeploymentId() {
        return deploymentId;
    }

    public void setDeploymentId(String deploymentId) {
        this.deploymentId = deploymentId;
    }

    public String getResourceName() {
        return resourceName;
    }

    public void setResourceName(String resourceName) {
        this.resourceName = resourceName;
    }

    public String getDiagramResourceName() {
        return diagramResourceName;
    }

    public void setDiagramResourceName(String diagramResourceName) {
        this.diagramResourceName = diagramResourceName;
    }

    @Override
    public String toString() {
        return "DisDeployment{" +
                "isSuspended=" + isSuspended +
                ", dName='" + dName + '\'' +
                ", dKey='" + dKey + '\'' +
                ", deploymentTime=" + deploymentTime +
                ", engineVersion='" + engineVersion + '\'' +
                ", pName='" + pName + '\'' +
                ", pKey='" + pKey + '\'' +
                ", version=" + version +
                ", deploymentId='" + deploymentId + '\'' +
                ", resourceName='" + resourceName + '\'' +
                ", diagramResourceName='" + diagramResourceName + '\'' +
                '}';
    }
}
